% Version for model with free entry
function [PriceChange, Mn, RXn,EqMoments,sD,omega,sX,TotalExports_norm,TotalImports_norm,SPn,In,weq,sNn, sMn,Ptotn,LNn,Neq] = DevaluationResults_FE(param, phi, fc_norm, fx_norm,FXM_norm,FX_norm,FM_norm,fe_norm, SDM,SDXM,zvec,yvec, P, Peq,Seq,weq)

g = param.gamma; 
sg = param.sg;
eta = param.eta;
qD = param.qD;
theta = param.theta;
tau = param.tau;
bl = param.bl;


% Re-scale fixed costs:

fc = (Peq^((sg-1)*(1-g) + 1/eta ) * Seq /weq * (qD*param.z)^(-1/eta) * (sg-1)^sg / (sg^sg) * (g*qD)^(g*(sg-1)) * (1-g)^((1-g)*(sg-1)) *eta * g * weq^(-(sg-1)*(1-g))).^(-1) * fc_norm;
fx = ((1+tau)^(theta *(sg-1)) * Peq^((sg-1)*(1-g*(1-theta))) * Seq * (g*qD)^(g*(sg-1)*(1-theta)) * (1-g)^((1-g)*(sg-1)*(1-theta)) *  (sg-1)^((1-theta)*(sg-1)) * sg^(sg*(theta-1)) * bl^(-theta) * (1/weq) ^(-(theta-1)*((sg-1)*(1-g)+1)) * (theta-1)/theta).^(-1/(1-theta)) * fx_norm;
FXM = (sg^(-sg) * (sg-1)^(sg-1) * (g*qD)^(g*(sg-1)) * (1-g)^((1-g)*(sg-1)) * Peq^((sg-1)*(1-g) ) * Seq * (1/weq)^((sg-1)*(1-g)+1))^(-1) * FXM_norm ;
FM = (sg^(-sg) * (sg-1)^(sg-1) * (g*qD)^(g*(sg-1)) * (1-g)^((1-g)*(sg-1)) * Peq^((sg-1)*(1-g) ) * Seq  * (1/weq)^((sg-1)*(1-g)+1))^(-1) * FM_norm ;
FX = (sg^(-sg) * (sg-1)^(sg-1) * (g*qD)^(g*(sg-1)) * (1-g)^((1-g)*(sg-1)) * Peq^((sg-1)*(1-g) ) * Seq  * (1/weq)^((sg-1)*(1-g)+1))^(-1) * FX_norm;
fe = fe_norm;

% Solve Model

[sD,sX,EqMoments,omega,TotalExports,TotalImports] =  SolveModel(phi,fc,fx,FXM,FX,FM,SDM,SDXM,zvec,yvec, param); % Note that here S is firm status
[Neq,SPn,~,Pn,RXn,Mn,In, sNn, sMn,Ptotn,LNn] = GEobjects_FE(weq,Seq,sD, sX, phi,fc,fx,fe, param);
MFn = (1-sNn)*sMn * In;  % final good imports in domestic labor
PriceChange = (Pn/P - 1)*100;
knorm = param.knorm;
TotalExports_norm = TotalExports *  (Pn/weq)^((sg-1)*(1-g) ) * (SPn/weq) * knorm; % in domestic labor
TotalImports_norm = TotalImports *  (Pn/weq)^((sg-1)*(1-g) ) * (SPn/weq) * knorm+MFn; % in domestic labor
end